﻿using ReflectionStudio.Components.UserControls;
using ReflectionStudio.Core.Events;
using System;
using System.ComponentModel;
using System.Data;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Media;
namespace WPFExcelReport
{
    public partial class MainWindow 
    {
    
        ViewModelBase vm;
        public MainWindow()
        {
            vm = new ViewModelBase();
            DataContext = vm;
            InitializeComponent(); 
            this.Name = "加工流程管理";

        }
        string CurrentUI = "";
        ViewBase ui;
        public override void OnWorkflowIDChange(MessageEventArgs e)
        {
            base.OnWorkflowIDChange(e);
            string wid = e.Info.Details;
            MainTab.Children.Clear(); 
            switch (wid)
            {
                case "KS05":
                    if (CurrentUI == wid)
                        return;
                    CurrentUI = wid;
                    ui = new ViewBase();
                    MainTab.Children.Add(ui); 
                    break; 

            }
        }

        
        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            

        } 
    }
}
